import pandas as pd

# 读取Excel文件
excel_file = 'C:\\Users\\asus\\Desktop\\新增的外协服务.xlsx'  # 替换为实际的Excel文件路径
data = pd.read_excel(excel_file)

# 遍历Excel数据，并生成SQL语句
for index, row in data.iterrows():
    obj_code = row['FNUMBER']
    obj_name = row['FNAME']
    en_name = row['FMODEL']

    # 构建SQL插入语句
    sql = ("INSERT INTO `sys_data_dictionary` (`obj_code`, `obj_name`, `en_name`, `order_num`, `obj_parent_id`, `obj_parent_code`, `delete_flag`, `obj_value1`, `obj_value2`, `obj_value3`, `obj_value4`, `obj_value5`, `obj_value6`) VALUES ( '{0}', '{1}', '{2}', 3, '949', 'wxfw', 0, '2', NULL, NULL, NULL, NULL, NULL);"
           .format(obj_code, obj_name, en_name))

    print(sql)
